package com.atguigu.patterns.singleton;


//饿汉式(静态变量)
public class SingletonStaticVariable implements AbstractSingleton {
	
	//1. 构造器私有化, 外部能new
	private SingletonStaticVariable() {
		
	}
	
	//2.本类内部创建对象实例
	private final static SingletonStaticVariable instance = new SingletonStaticVariable();
	
	//3. 提供一个公有的静态方法，返回实例对象
	public static SingletonStaticVariable getInstance() {
		return instance;
	}
	
}
